<html>

<head>
    <title>宝贝详情</title>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=no">
    <style>
        body,
        html,
        p {
            padding: 0;
            margin: 0;
            font-size: 12px;
            color: #333;
        }

        .container {
            background: #fff;
            width: 100%;
            height: 100%;
            text-align: center;
        }

        .title {
            display: block;
            font-size: 20px;
            font-weight: 700;
            margin: 10px;
        }

        div {
            width: 100% !important;
            height: 100% !important;
            overflow: auto !important;
        }

        img {
            max-width: 100%;
        }

        .img-content {
            width: 100%;
            height: 100%;
            display: flex;
            flex-direction: column;
        }
    </style>
</head>

<body>
    <div class="container">
        <p class="title">宝贝详情</p>
        <div class="img-content" id='imgContent'>
        </div>
    </div>
</body>
<script src="https://cdnjs.gtimg.com/cdnjs/libs/zepto/1.1.4/zepto.min.js"></script>
<script type="text/javascript">

    $(function () {
        let params = new URLSearchParams(location.search).get('goodsId')
        $.ajax({
            url: `https://h5api.m.taobao.com/h5/mtop.taobao.detail.getdesc/6.0/?jsv=2.5.1&api=mtop.taobao.detail.getdesc&v=6.0&data={"id":"${params}","type":"1"}&callback=jsonpCallback&v=6085`,
            type: "GET",
            dataType: "jsonp",
        });
    });
    function jsonpCallback({ data }) {
        let imgStr = data.pcDescContent
        let innerHTML = imgStr.replace(/\/\//g, 'https://')

        document.getElementById('imgContent').innerHTML = innerHTML
    }
</script>

</html>